package com.afkx.oop.demo8;

/**
 * @ClassName Test
 * @Description TODO
 * @Author Kx
 * @Date 2025/3/4 16:10
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Thief thief = new Thief("小偷");
        TaoistMaster taoistMaster = new TaoistMaster("天师");

        // 没有防盗功能的门
        thief.stealDoor(new TimberDoor("木门"));

        // 有防盗功能的门
        thief.stealDoor(new SecurityDoor("防盗门"));

        thief.stealCar(new Car("宝马"));

        taoistMaster.exorcise(new IronJadeDoor("铁玉门"));
    }
}
